#!/bin/ksh 

PID=$(ipcs -m |grep $USER |awk '{print $2}'|xargs) 
for one_pid in ${PID}; do 
  ipcrm -m ${one_pid} 
done 

PID=$(ipcs -q |grep $USER |awk '{print $2}'|xargs) 
for one_pid in ${PID}; do 
  ipcrm -q ${one_pid} 
done 


PID=$(ipcs -s |grep $USER |awk '{print $2}'|xargs) 
for one_pid in ${PID}; do 
  ipcrm -s ${one_pid} 
done 
